﻿
/*
 * 显示原则：有错报错，无错则无任何显示，输入非法和选择非法也无任何显示
 */


#include "Manager.h"
#include <map>
using namespace std;


int main(int argc, char** argv)
{
    Manager mgr;

    int choice = 1;
    while (choice)
    {
        choice = mgr.MainMenu();
        switch (choice)
        {
        case 1:
            mgr.Add();
            break;
        case 2:
            mgr.Delete();
            break;
        case 3:
            mgr.Modify();
            break;
        case 4:
            mgr.Search();
            break;
        case 5:
            mgr.Show();
            break;
        case 6:
            mgr.Sort();
            break;
        case 7:
            mgr.ImportAndExport();
            break;
        case 0:
            if (!mgr.Exit()) choice = 1;
            break;
        default:
            break;
        }
    }

    return 0;
}